package com.aaa.service;

import com.aaa.entity.Singer;
import com.aaa.entity.Song;
import com.aaa.mapper.SongMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SongService {
    @Resource
    SongMapper songMapper;
    public List<Song> selectAll(){
        return songMapper.selectList(null) ;
    }
    public List<Song> select(String name){
        return songMapper.selectid(name);
    }
    //添加
    public int add(Song song){
        return songMapper.insert(song);
    }
    //修改
    public int update(Song song){
        return songMapper.updateById(song);
    }
    //删除
    public int delete(Integer id){
        return songMapper.deleteById(id);
    }
}
